<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Bootstrap Modal</title>
    <link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css">
    <style>
        .addUser{
            margin:30px 0 0 50px;
        }
        .modal-title{
            margin-left: 30px;
        }
        .form-group{
            width: 50%;
            margin: 10px auto;
        }
        .modal-footer{
            margin-right: 30px;
        }
        .submit{
            margin-top: 20px;
        }
        .text-muted{
            line-height: 40px;
            text-align: center;
            color: #bbb;
        }
    </style>
</head>
<body>
    <h6>
        
        <button type="button" class="btn btn-primary btn-lg addUser" data-toggle="modal" data-target="#myModal">
            添加用户
        </button>
    </h6>
 
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">×</span>
                </button>
                <h4 class="modal-title" id="myModalLabel">请添加用户信息</h4>
            </div>
            <div class="modal-body">

            <form action="http://localhost:5000/add" method="post">
                <div class="form-group">
                    <label for="name">姓名</label>
                    <input type="text" class="form-control" id="inputName">
                </div>
                <div class="form-group">
                    <label for="age">年龄</label>
                    <input type="text" class="form-control" id="inputAge">
                   
                    
                </div>
                <div class="form-group">
                    <label for="hobbies">爱好</label>
                    <input type="text" class="form-control" id="inputHobbies">
                    <small class="text-muted">*如果有多项爱好请在爱好之间空格</small>
                    
                </div>
                <div class="form-group">
                    
                    <label for="email">电子邮箱</label>
                    <input type="text" class="form-control" id="inputHobbies">
                </div>
                <div class="form-group">
                    
                    <label for="email">密码</label>
                    <input type="password" class="form-control" id="inputPassword">
                    <button type="submit" class="btn btn-primary submit">Submit</button>
                </div>
            </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                <button type="button" class="btn btn-primary">Save</button>
            </div>
        </div>
    </div>
</div>
 
<script src="http://cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
<script src="http://cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
</body>
</html>